package cn.ccsn.ly;

import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
	   @Override
	    protected void configure(HttpSecurity http) throws Exception {
		   /**
		    * com.netflix.discovery.shared.transport.TransportException
		    * 是由于eureka的版本过高，并且在pom文件引入了security，然后eureka高版本默认开启csrf保护
		    * 因此我们需要在eureka服务端关闭csrf校验，具体操作如下：
		    */
	        http.csrf().disable();
	        super.configure(http);
	    }

}
